The invention relates to storing data items in a memory and to reading data items from a memory.
The invention further relates to a storage medium having stored thereon data items.
It is known to use a storage medium of fixed size to store multiple objects, which may be subjected to non-reversible (lossy) compression. Such applications include digital still cameras, where images are stored on a flash card, floppy disc or hard-drive. Further, video cameras are known in which multiple recordings are stored on a hard-drive, optical disc or tape. Also known are storage devices such as embedded memories, where it is desirable to minimize the total storage capacity used while still retaining a best possible image quality. Sometimes, a limited number of settings is available to the user to change the trade-off between quality and capacity. For example, video can be recorded in either xe2x80x98standard playxe2x80x99 or xe2x80x98long playxe2x80x99 mode, or snapshots can be taken at either xe2x80x98standard resolutionxe2x80x99 or xe2x80x98high resolutionxe2x80x99. Once a decision has been made to use a certain quality, the decision cannot be changed afterwards, even in those cases where ample storage capacity is still available.
Cormac Herley discloses in 6th International Conference on Image Processing (ICIP ""99), vol. 3, Kobe, Japan, Oct. 24-28, 1999, storage of digital camera images. The camera is designed to store a fixed number of images, and a lossy rate controlled compression is used to ensure that each image fits in the space allocated to it.
An object of the invention is to provide a range of new features. To this end, the invention provides a method of and an arrangement for storing data items in a memory, a method of and an arrangement for reading data items from a memory, and a storage medium as defined in the independent claims. Advantageous embodiments are defined in the dependent claims.
A first embodiment of the invention comprises dividing each data item into successive data pieces of decreasing significance, storing the data pieces in respective parts of the memory, and when applying a data piece to the memory in case all candidate memory parts are assigned to other data pieces:
if the significance of the applied data piece is lower than a lowest significance of the other data pieces, discarding the applied data piece; or
if the significance of the applied data piece is higher than the lowest significance of the other data pieces, storing the applied data piece in one of the candidate memory parts at expense of a given other data piece which has a lower significance than the significance of the applied data piece.
In a preferred embodiment of the invention, a record is kept for each data piece, the record comprising the significance of the data piece and the data item to which the data piece belongs. This record piece may be locally incorporated in a memory part, e.g. together with the data piece to which it belongs. Preferably, the record is kept in an auxiliary memory wherein each record further comprises a pointer which indicates a position in a main memory in which the data piece is stored.
The significance of a data piece is calculated according to a predetermined criterion. Preferably, the significance is calculated as a distortion difference.
Whenever a new data item is to be stored, it is preferably compressed by a scalable compression method in order to produce a scalable bit-stream. An advantageous method is described in non pre-published European patent application 99203839.8 dated Nov. 18, 1999 our reference PHN 17759). Such a scalable compression method has the property that the resulting scalable bit-stream may be cut off at any point, while the bits that remain in the scalable bit-stream give a best possible reconstruction quality for the given data item, given the number of bits available. When the scalable bit-stream is not cut off, the data item is encoded (near) losslessly, i.e. at a quality such that the reproduction is perceptually indistinguishable from the original. Scalable coding mechanisms are known for video and audio. In a preferred embodiment, the scalable bit-stream is cut into data pieces of the same sizes as the memory parts. Next, for each of these data pieces, a significance is calculated. Preferably, the significance is calculated as a distortion difference, which indicates an improvement in perceptual significance. The significance is used to compare the data pieces of the new item with the data pieces that are already stored. It can easily be understood that the data pieces produced by splitting the scalable bit-stream have the property of substantial decreasing significance, since the scalable coding methods first produce the most significant bits. The data pieces of a new item are then compared with the data pieces already present in the memory. When the new data pieces have a higher significance, previously stored data pieces are overwritten.
Although a scalable coding method is preferred, also a hierarchical coding method may be used.
The invention makes it feasible to store a variable number of data items in a fixed storage space. These data items are preferably multi-media objects, comprising audio objects, video objects, graphics objects etc. The data items are always stored with the best quality for a given amount of stored information. When an additional data item has to be stored, the quality (i.e. the amount of storage that is occupied) of the already stored data item is reduced enough to fit in the new data item, such that all data items will be stored at approximately the same quality.
Although in a preferred embodiment of the invention all memory parts have the same size, that is not required. The size of memory parts is chosen such that the storage capacity of multiple memory parts is usually required to store a single data item at a high quality. For example, a number of 8 storage data pieces is practical for storing an image.
In a preferred embodiment of the invention, a user is offered the possibility to store certain data items at higher quality than other data items.